from selenium import webdriver
from bs4 import BeautifulSoup

url='https://hahow.in/courses'
driver = webdriver.Chrome("chromedriver.exe")
driver.implicitly_wait(10)
driver.get(url)
soup=BeautifulSoup(driver.page_source,'lxml')
# fp=open('hahow.html','w',encoding='utf-8')
# fp.write(soup.prettify())
# print('写入文件hahow.html...')
# fp.close()
# driver.quit()

items=driver.find_elements_by_css_selector('h4.title')

for item in items:
    print(item.text)
driver.quit()